Repository navigation
Let a list as the last positional field take the remaining arguments in rfl::cli - #36
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
wave-base-8
branch
from
November 15, 2026 08:21
c662644 to
e97a969
Compare
clockblocker
force-pushed
the
cli-list-positional
branch
3 times, most recently
from
November 17, 2026 04:36
ebe2135 to
d77d479
Compare
clockblocker
force-pushed
the
wave-base-8
branch
from
November 17, 2026 04:36
081ae39 to
c117e48
Compare
clockblocker
force-pushed
the
cli-list-positional
branch
from
November 17, 2026 05:11
d77d479 to
9956818
Compare
clockblocker
force-pushed
the
wave-base-8
branch
from
November 17, 2026 07:15
1cd8321 to
956becd
Compare
clockblocker
force-pushed
the
cli-list-positional
branch
from
November 17, 2026 07:15
9956818 to
166cf83
Compare
clockblocker
force-pushed
the
wave-base-8
branch
from
November 17, 2026 09:35
956becd to
6b14d2b
Compare
clockblocker
force-pushed
the
cli-list-positional
branch
from
November 17, 2026 09:35
166cf83 to
4e8812a
Compare
…in rfl::cli If the last positional field is a list, it takes every positional argument after those of the other positional fields, each split at the commas: `app run a b,c` gives files = [a, b, c]. A list before other positional fields still takes one argument, and so does every positional field in the public resolve_args<T>, whose flat-map result cannot hold them. usage shows a list as the last positional as `<files>...`. Only inputs that used to fail change meaning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
clockblocker
force-pushed
the
wave-base-8
branch
from
November 17, 2026 09:44
6b14d2b to
7a87ae7
Compare
clockblocker
force-pushed
the
cli-list-positional
branch
from
November 17, 2026 09:45
4e8812a to
03f4447
Compare
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets a list declared as the last
rfl::Positionalfield consume all remaining positional arguments inrfl::cli::read, instead of failing withToo many positional arguments. Purely additive.Example
Key details
std::optional/rfl::DefaultValallow 0.--files=a --files=b) still works, but mixing--files=...with bare positionals returns a conflict error.resolve_args<T, Ps>keeps its one-per-field flat-map behavior.cli.md("A list as the last positional argument").AI-authored. Depends on: #26.